import Vue from 'vue'
import App from './App.vue'
import router from './router'
import axios from 'axios'

import 'ant-design-vue/dist/antd.css' // or 'ant-design-vue/dist/antd.less'
// 引入自定义全局样式
import './assets/css/global.css'

import Antd from 'ant-design-vue'
Vue.use(Antd)

Vue.config.productionTip = false
Vue.prototype.$http = axios
axios.defaults.baseURL = 'http://www.klxin.cn:8888/api/private/v1/'
// 路由拦截
axios.interceptors.request.use(config => {
  config.headers.Authorization = window.sessionStorage.getItem('token')
  // console.log(config)
  // 在最后必须 return config
  return config
})

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
